
// 已选择人员列表
export const personSeletedsConfig = {
  isSelectFlag: false,
  compRef: "gjxm",
  isSequenceFlag: true,
  // isShowPage: true,
  // resetFlag: false,
  loading: false,
  tableData: [],
  columns: [
    {
      prop: "name",
      label: "人员",
      align: "center"
    },
    {
      prop: "dept",
      label: "部门",
      align: "center"
    }
  ],
  tableAttr: {
    "max-height": "470px",
    stripe: false,
    border: true,
    fit: true,
    "show-header": true,
    "highlight-current-row": true,
    "cell-style": {
      "font-size": "16px"
    },
    "header-cell-style": {
      "text-align": "center",
      "background-color": "#B1C8F9",
      border: "1px solid #ccc",
      "font-size": "16px"
    }
  }
};
// 人员选择前
export const personSelectSource = {
  isSelectFlag: true,
  compRef: "personSelectSource",
  isSequenceFlag: false,
  // isShowPage: true,
  // resetFlag: false,
  loading: false,
  tableData: [
    {
      sdx: "省级发布",
      xyjb: "I级",
      sjlb: "暴雨",
      persons: [
        {
          id: "1",
          name: "张三",
          dept: "安监部"
        },
        {
          id: "2",
          name: "李四",
          dept: "安监部"
        }
      ]
    },
    {
      sdx: "省级发布",
      xyjb: "I级",
      sjlb: "暴雨",
      persons: [
        {
          id: "1",
          name: "王五",
          dept: "安监部"
        },
        {
          id: "2",
          name: "王六",
          dept: "安监部"
        }
      ]
    }
  ],
  columns: [
    {
      prop: "",
      label: "到岗到位人员",
      align: "center",
      "min-width": "230px",
      render: (h, { row }) => {
        // const { persons } = row
        // const personsText = persons.length ? persons.map(item => `${item.name}(${item.dept})`).join("、") : ""
        return (
          <div>
            {
              // <span
              //   style=''
              // >
              //   {personsText}
              // </span>
            }
          </div>
        );
      }
    },
    {
      prop: "sdx",
      label: "省/地/县",
      align: "center"
    },
    {
      prop: "xyjb",
      label: "响应级别",
      align: "center"
    },
    {
      prop: "sjlb",
      label: "事件类别",
      align: "center"
    },
    {
      prop: "",
      label: "到岗到位人员",
      align: "center",
      "min-width": "230px",
      render: (h, { row }) => {
        const { persons } = row;
        const personsText = persons.length ? persons.map(item => `${item.name}(${item.dept})`).join("、") : "";
        return (
          <div>
            {
              <span
                style=''
              >
                {personsText}
              </span>
            }
          </div>
        );
      }
    }
  ],
  tableAttr: {
    "max-height": "470px",
    stripe: false,
    border: true,
    fit: true,
    "show-header": true,
    "highlight-current-row": true,
    "cell-style": {
      "font-size": "16px"
    },
    "header-cell-style": {
      "text-align": "center",
      "background-color": "#B1C8F9",
      border: "1px solid #ccc",
      "font-size": "16px"
    }
  }
};
